<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>顺风车---欢迎光临<s:property value="user.nickName"/>的店铺</title>
<link href="${ctx}/css/panels.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/shop-css/shophome.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div class="your_position">您现在的位置：<a name="linkHome" href="${ctx}">顺风车</a> &gt;&gt; <a href='#' name='linkCategoryNavi'>网络车库</a> &gt;&gt; <span><s:property value="user.nickName"/>的车库</span></div>
<div class="page_div">
  <div class="div_left">
  
    <div class="bluePanel">
 	 <h3><a href="#" class="titleLink" title="卖家基本信息">卖家基本信息</a></h3>
 	 <div class="box">
 	 	<div class="shoper_info">
		<h2><a href="#"><s:property value="user.nickName"/>的车库</a></h2>
		<div>
			<ul>
				<li><img src="${ctx}/images/shop-img/boy.gif"/></li>
				<li>昵称：<s:property value="user.nickName"/></li>
				<li>学校：<s:property value="user.orgName"/></li>
				<li>专业：<s:property value="user.orgName"/></li>
				<li>性别：<s:property value="user.sex"/></li>
				<li>Q  Q:<s:property value="user.qq"/></li>
			</ul>
		</div>
		<p>
			<span class="item_list_button"><a name="link_favorlist" href="javascript:addToFavorlist('<s:property value='user.id'/>','user')"><img src="${ctx}/images/index-img/search/buttom_favorite.gif" onmouseover='this.src="${ctx}/images/index-img/search/buttom_favorite_over.gif"' onmouseout='this.src="${ctx}/images/index-img/search/buttom_favorite.gif"' onmousedown='this.src="${ctx}/images/index-img/search/buttom_favorite_click.gif"' title="放入暂存架"/></a></span>
			<span class="item_list_button"><a name="link_favorlist" href='javascript:showErr();'><img src="${ctx}/images/index-img/search/liuyan.gif" onmouseover='this.src="${ctx}/images/index-img/search/liuyan_over.gif"' onmouseout='this.src="${ctx}/images/index-img/search/liuyan.gif"' onmousedown='this.src="${ctx}/images/index-img/search/liuyan_click.gif"' title="我要留言"/></a></span>
		</p>
		</div>
    </div>
    </div>
    
    <div class="bluePanel">
 	 <h3><a href="#" class="titleLink" title="搜索店内商品">店内商品搜索</a></h3>
 	 <div class="box">
 	 	<div class="inner_search">
		<form action="#" method="post">
			<ul>
				<li>
					<label for="keyword">关键字：<br/></label><span><input type="text"/></span>
				</li>
				<li>
					<label for="keyword">价     格：<br/></label><span><input type="text" style="width:62px;"/>~~~<input type="text" style="width:62px;"/></span>
				</li>
				<li><button type="submit" onclick="showErr();return false;">&nbsp;&nbsp;搜&nbsp;&nbsp;&nbsp;&nbsp;索&nbsp;&nbsp;</button></li>
			</ul>		
		</form>
		</div>
    </div>
    </div>
    
    <div class="bluePanel">
 	 <h3><a href="#" class="titleLink" title="经典好车收藏">店主好车收藏</a></h3>
 	 <div class="box">
 	 	<div class="f_book">
		<ul>
			<s:if test="favoriteBooks.size != 0">
			<s:iterator value="favoriteBooks" status="itStatus">
			<li>
				<div class="f_pic"><a href="${ctx}/shop/book-detail.action?id=<s:property value='favoriteId'/>"><img src="${ctx}/images/myhome-img/java.jpg"/></a></div>
				<div class="f_desc"><a href=""><s:property value="favoriteBooks.favoriteName"/></a></div>
				<div class="f_price"><span class="del">￥108.00</span>　<span class="red">￥86.40</span></div>
				<div class="f_time">发布时间:2009/10/11</div><div class="clear"></div>
			</li>
			</s:iterator>
			</s:if>
			<s:else>
				<li>对不起，用户没有收藏一辆好车！</li>
			</s:else>
			<!--		
			<li>
				<div class="f_pic"><a href="#"><img src="#"/></a></div>
				<div class="f_desc"><a href="">Thinking in java</a></div>
				<div class="f_price"><span class="del">￥108.00</span>　<span class="red">￥86.40</span></div>
				<div class="f_time">发布时间:2009/10/11</div><div class="clear"></div>
			</li>
			-->
		</ul>		
		</div>
    </div>
    </div>
    
    <div class="bluePanel">
 	 <h3><a href="#" class="titleLink" title="好友收藏">好友友情链接</a></h3>
 	 <div class="box">
 	 	<div class="f_user">
		<ul>
			<s:if test="friends.size != 0">
			<s:iterator value="friends" status="itStatus">
			<li>
				<div class="f_ico"><a href="${ctx}/shop/shop-home.action?id=<s:property value='favoriteId'/>"><img src="${ctx}/images/shop-img/girl.gif"/></a></div>
				<div class="f_name"><a href="">liangThink</a></div>
				<div class="f_school">学校：浙江理工大学</div>
				<div class="f_u_time">加入时间:2009/10/11</div><div class="clear"></div>
			</li>
			</s:iterator>
			</s:if>
			<s:else>
			<li>对不起，用户还没有一个好友！</li>
			</s:else>
			<!--
			<li>
				<div class="f_ico"><a href="#"><img src="${ctx}/images/shop-img/girl.gif"/></a></div>
				<div class="f_name"><a href="">liangThink</a></div>
				<div class="f_school">学校：浙江理工大学</div>
				<div class="f_u_time">加入时间:2009/10/11</div><div class="clear"></div>
			</li>
			-->
		</ul>
		</div>
    </div>
    </div>
    
  </div>
   
<div class="div_right">
   <div class="bluePanel">
 	<h3><a href="#" class="titleLink" title="用户店内图书">店主发布的新车</a></h3>
 	<div class="box">
		<ul class="item_list">
			<s:if test="bookForsaleList.pageList != null">
			<s:iterator value="bookForsaleList.pageList" status="itStatus">
			<li>
				<h4></h4>
				<div class="item">
					<div class="pic"><a href="${ctx}/shop/book-detail.action?id=<s:property value='bookId'/>" target="_blank"><img src="${ctx }/images/myhome-img/java.jpg" alt='<s:property value="bookName"/>'/></a></div>
					<div class="desc"><a href="${ctx}/shop/book-detail.action?id=<s:property value='bookId'/>" target="_blank"><s:property value="publisher"/><br/><s:property value="bookName"/></a></div>
					<div class="price">
						<span class="del">￥<s:property value="origPrice-0"/></span>　
						<span class="red">￥<s:property value="price-0"/></span>
					</div>
				</div>
			</li>
			</s:iterator>
			</s:if>
			<s:else>
			<li><h4>店主暂时还没有发布新车！</h4></li>
			</s:else>
			<!--
			<li>
				<h4></h4>
				<div class="item">
					<div class="pic"><a href="#" target="_blank"><img src="${ctx }/images/myhome-img/java.jpg" alt='Java编程思想（第4版）'/></a></div>
					<div class="desc"><a href="#" target="_blank">人民教育出版社<br/>java编程思想</a></div>
					<div class="price"><span class="del">￥108.00</span>　<span class="red">￥86.40</span></div>
				</div>
			</li>	
			-->
		</ul>
		<div class="clear"></div>
		<div class="item_list_line">&nbsp;</div>
		<p class="show_more"><span class="item_list_button"><a name="link_favorlist" href='javascript:showErr();'><img src="${ctx}/images/index-img/search/more.gif" onmouseover='this.src="${ctx}/images/index-img/search/more_over.gif"' onmouseout='this.src="${ctx}/images/index-img/search/more.gif"' onmousedown='this.src="${ctx}/images/index-img/search/more_click.gif"' title="放入暂存架"/></a></span></p>
   </div>
  </div><!--end of panel  -->
  <div class="clear"></div>
  
<div class="bluePanel">
 	<h3><a href="#" class="titleLink" title="店内热销车">店内热销车</a></h3>
 	<div class="box">
    <div class="list_r_line"></div> 
  <s:if test="bookSelledList.size != 0">
  <s:iterator value="bookSelledList" status="itStatus">
  <div class="list_r_list"> 
  	<span class="list_r_list_book">
	    <a name="link_prd_img" class="book_pic_x" href='#' target="_blank">
	    	<img  src='${ctx }/images/myhome-img/java.jpg' alt='Java编程思想（第4版）'/>
	    </a>
  	</span>
    <h2><a name="link_prd_name" href='${ctx}/shop/book-detail.action?id=<s:property value="bookId"/>' target="_blank">Java编程思想（第4版）</a></h2>
    <h3>顾客评分：<img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red2.gif' /></h3>
   
    <h4>品&nbsp;&nbsp;牌：<a target='_blank' href='#' name='品牌'>捷安特</a></h4>
    <h6><span class="del">￥108.00</span>　<span class="red">￥86.40</span>　折扣：80折　节省：￥21.60</h6>
	<div class="clear"></div>
  </div>
  <div class="clear"></div>
  </s:iterator>
  </s:if>
  <s:else>
  <div class="list_r_list"> 
    <h2>此用户还没有热销型车子！</h2>
	<div class="clear"></div>
  </div>
  <div class="clear"></div>
  </s:else>
  
  <!-- 
  <div class="list_r_list"> 
  	<span class="list_r_list_book">
	    <a name="link_prd_img" class="book_pic_x" href='#' target="_blank">
	    	<img  src='${ctx }/images/myhome-img/java.jpg' alt='Java编程思想（第4版）'/>
	    </a>
  	</span>
    <h2><a name="link_prd_name" href='${ctx}/shop/book-detail.action' target="_blank">Java编程思想（第4版）</a></h2>
    <h3>顾客评分：<img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red2.gif' /></h3>
    <h4 class="list_r_list_h4">作　&nbsp;&nbsp;&nbsp;&nbsp;者：（美）<a target='_blank' href='#' name='作者'>埃克尔</a> 著，<a target='_blank' href='#' name='作者'>陈昊鹏</a> 译</h4>
    <h4>出&nbsp;&nbsp;版&nbsp;&nbsp;社：<a target='_blank' href='#' name='出版社'>机械工业出版社</a></h4>
    <h4>出版时间：2007年06月</h4>
    <h6><span class="del">￥108.00</span>　<span class="red">￥86.40</span>　折扣：80折　节省：￥21.60</h6>
	<div class="clear"></div>
  </div>
  <div class="clear"></div> 
  -->
  
  <div class="item_list_line">&nbsp;</div>
  <p class="show_more" style="margin-top:10px;"><span class="item_list_button"><a name="link_favorlist" href='javascript:showErr();'><img src="${ctx}/images/index-img/search/more.gif" onmouseover='this.src="${ctx}/images/index-img/search/more_over.gif"' onmouseout='this.src="${ctx}/images/index-img/search/more.gif"' onmousedown='this.src="${ctx}/images/index-img/search/more_click.gif"' title="放入暂存架"/></a></span></p>
  </div>
 </div><!--end of panel  -->
  <div class="clear"></div>
</div><!--end of right  -->
</div>
<script type="text/javascript">
function showErr(){
	alert("对不起，暂不支持此功能！");
};
function addToFavorlist(productId,productType){
	var user = "<s:property value='#session.niagara_security_session_login'/>";
	if(user == ""){
		alert("您还没有登录！");
		window.location = "${ctx}/login.action";
		return;
	}
	if(productType == "user"){
		url= "${ctx}/home/friends!add.action";
		$.post(url,
			   {addUserId:productId},
		       function(data,status){
			       if(data==""){
				       alert("此用户已经加为您关注的好友！");
			       }else{
				       alert(data);
			       }			       
			   },'text'
		);
	}
	if(productType == "book"){
		url= "${ctx}/home/favorite-book!add.action";
		$.post(url,
			   {bookId:productId},
		       function(data,status){
			       if(data==""){
				       alert("此书已经加入到您的收藏夹中！");
			       }else{
				       alert(data);
			       }
			   },'text'
		);
	}
};
</script>

<!--页尾 开始 -->
<!--页尾 end -->

</body>
</html>